package TaskOne;

import com.sun.tools.attach.AgentInitializationException;

import java.awt.*;

/**
 * 动物类
 */

public class Animal {
    /**
     * 年龄
     */
    private int age;
    /**
     * 颜色
     */
    private String color;
    /**
     * 名字
     */
    private String name;
    //空的构造方法
    public Animal(){
    }
    public Animal(int age,String color,String name){
        this.age= age;
        this.color=color;
        this.name=name;
    }
    public void output(){
        System.out.println(age+color+name);
    }
   //访问修饰  get
    public int getAge(){
        return age;
    }
    //修改修饰符
    public void setAge(int age){
        this.age=age;
    }

    public String getColor(){
        return color;
    }
    public void setColor(String color){
        this.color=color;
    }
    public String getName(){
        return name;
    }
    public void setName(String name){
        this.name=name;
    }
    public static void main(String[]args){
        Animal animal=new Animal(2,"名字","颜色");





        animal.output();


    }



}
